// Copyright (C) joyinter
// All rights reserved.
// 
// Author : Jiang Li
// Date   : 2004-10-13

#include "stdafx.h"
#include ".\transsocket.h"
#include "roompage.h"
#include "mainuiman.h"

//##ModelId=44C4B5E40083
CJoyTransSocket::CJoyTransSocket(void)
{
    this->m_handler = this;
}

//##ModelId=44C4B5E40085
CJoyTransSocket::~CJoyTransSocket(void)
{
}

//##ModelId=44C4B5E4008C
CJoyRoomPage* CJoyTransSocket::GetRoomPage()
{
    return JoyGetMainManager()->m_roomPage;
}

//##ModelId=44C4B5E40060
void CJoyTransSocket::OnSock_Connect(int )
{
    JoyMessage::MC_MainLogin loginData;
    GetRoomPage()->MakeLoginMsg(loginData);
    SendJoyMsg(&loginData);
    
}

//##ModelId=44C4B5E4006E
void CJoyTransSocket::OnMsg_SockTransmitUDP(
    const JoyMessage::MS_SockTransmitUDP* msg)
{
    GetRoomPage()->OnMsg_SockTransmitUDP(msg);
}

//##ModelId=44C4B5E40071
void CJoyTransSocket::OnMsg_SockTransmitTCP(
    const JoyMessage::MS_SockTransmitTCP* msg)
{
    GetRoomPage()->OnMsg_SockTransmitTCP(msg);
}

//##ModelId=44C4B5E40074
void CJoyTransSocket::OnMsg_SockConnect(const JoyMessage::MS_SockConnect* msg)
{
    GetRoomPage()->OnMsg_SockConnect(msg);
}

//##ModelId=44C4B5E4007D
void CJoyTransSocket::OnMsg_SockAccept(const JoyMessage::MS_SockAccept* msg)
{
    GetRoomPage()->OnMsg_SockAccept(msg);
}

//##ModelId=44C4B5E40080
void CJoyTransSocket::OnMsg_SockClose(const JoyMessage::MS_SockClose* msg)
{
    GetRoomPage()->OnMsg_SockClose(msg);
}
